package com.liangxy.zhyl.mapper;

import com.github.pagehelper.Page;
import com.liangxy.zhyl.dto.RoleDto;
import com.liangxy.zhyl.entity.Role;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;

import java.util.List;

@Mapper
public interface RoleMapper {
    int deleteByPrimaryKey(Long id);

    int insert(Role record);

    int insertSelective(Role record);

    Role selectByPrimaryKey(Long id);

    int updateByPrimaryKeySelective(Role record);

    int updateByPrimaryKey(Role record);

    /**
     * Mybatis Generator插件生成的方法
     * 批量添加
     * @mbg.generated
     * @author hewei
     */
    int batchInsert(@Param("list") List<Role> list);

    Page<List<Role>> selectPage(RoleDto roleDto);

    List<Role> selectAll();
}